package com.digital.welcome.controller;

import com.digital.welcome.annotation.OperationLog;
import com.digital.welcome.entity.User;
import com.digital.welcome.service.UserLessPayService;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 莲童的雨儿
 */
//@Deprecated
@RestController
@RequestMapping(value = "/user-less-pay")
public class UserLessPayController {

    @Autowired
    private UserLessPayService userLessPayService;

    @OperationLog()
    @ApiOperation("绿色通道办理")
    @RequiresPermissions("green")
    @RequestMapping(value = "/do", method = RequestMethod.POST)
    public String userLessPayDo(@RequestBody User user) {
        return userLessPayService.userLessPayDo(user);
    }

    @ApiOperation("首页")
    @RequestMapping(value = "/Data", method = RequestMethod.GET)
    public String getNumber() {
        return userLessPayService.selectNumber();
    }
}
